There is a vehicle in which a device (hereinafter, referred to as a “driver monitor”) for monitoring inattentive driving or drowsy driving of a driver is mounted. The driver monitor detects an eye of the driver from a face image of the driver which is captured by a camera, and detects a direction of a line of sight of a pupil, a closing state of an eyelid, or the like. However, if the driver is wearing eyeglasses, illumination light in the vehicle, external light, illumination light for capturing an image, or the like is reflected from a lens or a frame of the eyeglasses, and thereby, it is impossible to accurately detect a pupil or an eyelid. Particularly, in a case where reflected light from the eyeglasses overlaps the pupil, detection accuracy decreases remarkably. In order to solve this problem, technologies disclosed in JP-A-2008-123137 and JP-A-2006-48328 are known.
In JP-A-2008-123137, two illumination devices are provided in a camera for a vehicle. The camera for a vehicle alternately lights the two illumination devices in synchronization with imaging timing, and captures images of a subject to which one of the illumination devices emits light and to which the other illumination device emits light. Then, luminances of each pixel of the captured two images are compared with each other, the pixels having the same relative position, a pixel with the lower luminance is extracted, and one synthesized image is generated. Thereby, unexpected reflection of light from the eyeglasses is reduced, and the eye is easily detected.
In JP-A-2006-48328, it is determined whether or not luminance values of each pixel of an image are larger than a threshold value when detecting a face from the image which is captured by a camera. Then, in a case where a high luminance portion which is configured by pixels with a luminance value larger than the threshold value is detected, the luminance value of each pixel of the high luminance portion is set to low luminance, and thus, the high luminance portion is converted into a low luminance portion. Thereby, the high luminance portion caused by the reflected light from the eyeglasses is removed, and thus, the eye is easily detected.
However, in a case where a right side of a face of a subject is irradiated with light and the face is captured, luminance of a left side of the face is lower than luminance of the right side of the face, and thus, an image of the left side of the face is darker. Meanwhile, in a case where the left side of the face of the subject is irradiated with light and the face is captured, the luminance of the right side of the face is lower than the luminance of the left side of the face, and thus, an image of the right side of the face is darker. Hence, as disclosed in JP-A-2008-123137, if a synthesized image is generated by using pixels with the smaller luminance value of two images, the entire image becomes dark. Accordingly, there is a possibility that it is hard to accurately detect an outline of a face image or to accurately detect a pupil or an eyelid from the face image.
In contrast to this, in the technology of JP-A-2006-48328, it is possible to prevent the entire image from becoming dark, but a high luminance portion is converted into a low luminance portion, and thus, there is a possibility that a white portion of an eye becomes dark. In addition, since a bright portion is converted into a dark portion using a threshold value as a boundary, brightness becomes discontinuous at the converted portion and a non-converted portion adjacent thereto, therefore, an image is unnatural. In addition, as disclosed in JP-A-2006-48328, a method of removing a high luminance portion based on the threshold value includes branched processing in an algorithm of image processing, and thus, there is a problem that arithmetic processing is complicated.